Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update MessageVersionData for service compatibility #3037

Draft
wants to merge 2 commits into
base: develop-2.0.0
Choose a base branch
from

Conversation

NoelStephensUnity
Copy link
Collaborator

First pass of sending ILPPMessageProvider.NetworkMessageTypes when using a distributed authority network topology.

Changelog

NA

Testing and Documentation

  • Includes integration test.
  • No documentation changes or additions were necessary.

Making modification to MessageVersionData so it sends the ILPPMessageProvider.NetworkMessageTypes of the message type during the client connection process.
very simple test to validate the correct NetworkMessageTypes is being sent and only when using a distributed authority network topology.
@@ -567,14 +566,29 @@ private void SendConnectionRequest()
if (MessageManager.MessageTypes[index] != null)
{
var type = MessageManager.MessageTypes[index];
message.MessageVersions[index] = new MessageVersionData
var messageVersionData = new MessageVersionData
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole group of logic feels like it maybe would make sense on the data structure?

Something like two constructors, one that is for DistributedAuthorityMode == false and takes the hash and the version, and one that is for DistributedAuthorityMode == true that takes the type and the version, and then calculates the hash internally. That way if the type is important, the hash can never be wrong. That would also mean the logic of do we or do we not send the type is better encapsulated and consistent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm... let me fiddle with that idea...seems a bit cleaner indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants